<template>
  <div class="block">
    <el-pagination
      background
      :hide-on-single-page="true"
      :current-page="page.page"
      :page-size="page.list_rows"
      layout="total, prev, pager, next, jumper"
      :total="page.total"
      @current-change="handleCurrentChange"
    />
  </div>
</template>

<script>
export default {
  name: 'MyPagination',
  inheritAttrs: false,
  props: {
    page: {
      page: Number,
      list_rows: Number,
      total: Number
    }
  },
  methods: {
    handleCurrentChange(val) {
      this.page.page = val
      this.$emit('current-change')
    }
  }
}
</script>

<style scoped>

</style>
